<div ng-controller="CategoryCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/category/list">{{'Category'| translate}}</a></li>
        <li>{{"List"|translate}} </li>
        <span class="sui-form sui-form pull-right"> 
          <!-- <store-list ng-model="store_id" dft="1" ng-show="false"></store-list> -->
          <a href="#/category/add" class="sui-btn btn-primary">+{{'add_new'|translate}}</a>
        </span>
    </ul>

    
    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th>{{'Category'| translate}}</th>
                <th>{{'operation'| translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <div class="zTreeDemoBackground">
                        <cat-tree ng-model="chosedCat" obj="1" store="store_id"></cat-tree>
                    </div>
                </td>
                <td ng-show="chosedCat">
                    {{'change_cat_name'|translate}}：
                    <input ng-model="name" type="text" value="" class="input-xlarge">
                    排序:
                    <input ng-model="sort" type="numer" value="" class="input-xlarge">
                    <button ng-click="update($event)" class="sui-btn btn-primary">{{'save'|translate}}</button>
                    <a href="#/category/relation?id={{chosedCat.id}}" class="sui-btn btn-info">{{'绑定标签'|translate}}</a>
                    <button ng-click="delete($event)" ng-if="chosedCat.id !=1" class="sui-btn btn-danger">{{'delete'|translate}}</button>
                </td>
            </tr>
        </tbody>
    </table>
    <div style="display:none" item-dialog chosed-item="$parent.chosedItem"></div>
</div>
